Skip to content

feat: add Parent Pointer Tree #662

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

FamALouiz
Copy link

References to Issue

Resolves #325

Brief description of what is implemented

  • Added parent pointer tree for python backend
  • Added parent pointer tree tests

@TripleCamellya
Copy link
Contributor

In my opnion, for add a new data structure or algorithm for public, the final interception is reserved by czgdp1807.

First step is append the class or function in the beginning array __all__ of the file. Like:

__all__ = [
    'MAryTree',
    'ParentPointerTree'
]

Secondly, add the API in the module's __init__.py file. Like

from .m_ary_trees import (
    MAryTreeNode, MAryTree,
    ParentPointerTreeNode, ParentPointerTree
)

For ParentPointerTreeNode, you can check the above steps.

Three, after above two steps, you can import ParentPointerTree by

from pydatastructs import MAryTree, ParentPointerTree

Lastly, update your new datastructure in docs.

@FamALouiz
Copy link
Author

Yea, points 1, 2, and 4 are valid. I had forgotten to add them.

As for point 3, I was following the importing style in the other files. In the other files, they important it differently. For example,

from pydatastructs.linear_data_structures.arrays import ArrayForTrees

However, The points are nice regardless thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Parent pointer tree
2 participants